package bootstrap

import (
	"camera_app/db"

	"gorm.io/gorm"
)

type Application struct {
	DB          *gorm.DB
	RedisClient *db.RedisClient
}

func NewApplication() (app *Application, err error) {
	dbInstance, _ := db.GetDatabaseInstance("/root/camera/config.yaml")
	redisClient := db.NewRedisClient("113.31.126.91", "zzh0117.", 0)
	app = &Application{
		DB:          dbInstance,
		RedisClient: redisClient,
	}
	return
}
